<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Story extends MY_Controller {

	function __construct()
	{
		parent::__construct();
		
		
	}

	function index()
	{
		if ($this->uri->segment(2) === FALSE)
		{
            redirect('news');
		}
		else
		{
			$data['story_id'] = $this->uri->segment(2);
            $data['story'] = OxStory::from_id($data['story_id']);
		}
	
		$data2['boxes'] = array (
		         $this->BoxRecentRelated($data['story']),
		         $this->BoxFeatured(),
                 $this->BoxSuggestedReading($data['story']),
		         $this->BoxFeatured(),
				);
        
		$this->ShowHeader();
		$this->load->view('story_page', $data);
		$this->load->view('box_frame', $data2);
		$this->ShowFooter();
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */